Public Class HotlineChangerServiceOrderStatusControl
    Inherits System.Web.UI.UserControl

#Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub
    Protected WithEvents DataGrid1 As System.Web.UI.WebControls.DataGrid

    'NOTE: The following placeholder declaration is required by the Web Form Designer.
    'Do not delete or move it.
    Private designerPlaceholderDeclaration As System.Object

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()
    End Sub

#End Region

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.DataGrid1.ItemStyle.CssClass = "solbaslik"
        Me.DataGrid1.AlternatingItemStyle.CssClass = "input"
        If Not Me.IsPostBack Then
            Me.LoadStatus(0)
        End If
    End Sub

    Public Sub LoadStatus()
        Me.LoadStatus(Me.DataGrid1.CurrentPageIndex)
    End Sub


    Private Sub LoadStatus(ByVal pageIndex As Integer)
        Me.DataGrid1.CurrentPageIndex = pageIndex
        Me.DataGrid1.DataSource = persistent.Hotline.GetHotlineStatus(Request.QueryString("CustCode"))
        Me.DataGrid1.DataBind()

        DataGrid1.AllowPaging = DataGrid1.PageCount > 1
    End Sub

    Private Sub DataGrid1_PageIndexChanged(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles DataGrid1.PageIndexChanged
        Me.LoadStatus(e.NewPageIndex)
    End Sub
End Class
